package cn.vshare.util;

import org.springframework.web.servlet.view.InternalResourceView;

import java.io.File;
import java.util.Locale;

public class Parse2ResourceView extends InternalResourceView {
    /*springMVC的视图解析器,可解析ftl,xml,ftl文件*/
    /*<!--20181004wyl-->
	<!--配置视图解析器,将handler方法返回值解析为实际的物理视图-->
	spring-mvc.xml:73
	*/
    @Override
    public boolean checkResource(Locale locale) throws Exception {
        File file=new File(this.getServletContext().getRealPath("/")+getUrl());
        return file.exists();
    }
}
